package com.lagou.sqlSession;

import java.util.List;

/**
 * @Title: IPersistence
 * @Description:
 * @Author: Wenfeng Cheng
 * @Date: 2020-11-28 10:33
 * @Version: 1.0.0
 */
public interface SqlSession {

    //查询所有
    public <E> List<E> selectList(String statementId, Object... params) throws Exception;
    //查询单个
    public <T> T selectOne(String statementId, Object... params) throws Exception;

    //增加
    public int insert(String statementId, Object... params) throws Exception;

    //根据id修改
    public int updateById(String statementId, Object... params) throws Exception;

    //根据id删除
    public int deleteById(String statementId, Object... params) throws Exception;

    //为dao接口生成代理对象
    public <T> T getMapper(Class<?> mapperClass);
}
